#include <bits/stdc++.h>
using namespace std;
int t;
double a,b,c,d;
int main(void){
    scanf("%d",&t);
    while(t--){
        scanf("%lf%lf%lf%lf",&a,&b,&c,&d);
        printf("%.1lf\n",sqrt((a-c)*(a-c)+(b-d)*(b-d)));
    }
    return 0;
}